package com.redoor.app.stake.auth.dao;

import com.redoor.app.stake.auth.model.BaseMenu;
import com.redoor.app.stake.auth.model.BaseMenuCriteria;
import com.redoor.app.stake.auth.model.serviceModel.BaseMenuServiceBean;
import com.redoornetwork.framework.mybatis.mapper.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface BaseMenuMapper extends Mapper<BaseMenu> {
    /**
     * 菜单主查询
     * @Author zhangYiHang
     * @Date 2018/3/9 10:24
     */
    List<BaseMenuServiceBean> qryMenu(BaseMenuCriteria baseMenuCriteria);

    /**
     * 根据权限uuid查询菜单
     * @Author zhangYiHang
     * @Date 2018/3/9 10:22
     */
    List<BaseMenuServiceBean> qryMenuRoleUuid(@Param("uuid") String uuid);
    /**
     * 根据用户id查询菜单(一级菜单)列表
     * @Author zhangYiHang
     * @Date 2018/3/9 14:56
     */
    List<BaseMenuServiceBean> qryMenuUserUuid(@Param("userUuid") String userUuid);

    /**
     * 根据父类查询菜单数据(二级菜单)
     * @Author zhangYiHang
     * @Date 2018/3/10 17:10
     */
    List<BaseMenuServiceBean> qryMenuByParentUuid(Map<String, Object> map);
    /**
     * 按钮菜单(三级菜单)
     * @Author zhangYiHang
     * @Date 2018/3/10 17:19
     */
    List<BaseMenu> qryButtnByParentUuid(Map<String, Object> map);

    /**
     * 查询一级菜单列表
     * @Author zhangYiHang
     * @Date 2018/3/13 17:58
     */
    List<BaseMenu> qryMenuList(@Param("type")String type);
    /**
     * 菜单单表查询(JSTree用)传入参数为角色uuid
     * @Author zhangYiHang
     * @Date 2018/3/14 17:26
     */
    List<BaseMenu> qryMenuAll(@Param("uuid")String uuid);
    /**
     * 根据uuid查询授权
     * @Author zhangYiHang
     * @Date 2018/3/30 21:00
     * @Param
     */
    List<String> qryMenuPermByUseruuid(@Param("uuid") String uuid);
}